/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Models;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

/**
 *
 * @author Cham to tet
 */
@ManagedBean(name = "companyBean")
@RequestScoped
public class Company {

    /** Creates a new instance of Company */
    int id;
    String name, contactPerson, designation;
    String address, mobile, telephone, fax, memberType;
    boolean status;
    Company company;

    public Company getCompany() {
        return company;
    }

    public void setCompany(Company company) {
        this.company = company;
    }
    
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getContactPerson() {
        return contactPerson;
    }

    public void setContactPerson(String contactPerson) {
        this.contactPerson = contactPerson;
    }

    public String getDesignation() {
        return designation;
    }

    public void setDesignation(String designation) {
        this.designation = designation;
    }

    public boolean isStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    public String getFax() {
        return fax;
    }

    public void setFax(String fax) {
        this.fax = fax;
    }

    public String getMemberType() {
        return memberType;
    }

    public void setMemberType(String memberType) {
        this.memberType = memberType;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public Company(int id, String name, String contactPerson, String designation, String address, String mobile, String telephone, String fax, String memberType, boolean status) {
        this.id = id;
        this.name = name;
        this.contactPerson = contactPerson;
        this.designation = designation;
        this.address = address;
        this.mobile = mobile;
        this.telephone = telephone;
        this.fax = fax;
        this.memberType = memberType;
        this.status = status;
    }
   
    public void edit(Company com){
        this.name = com.name;
        this.contactPerson = com.contactPerson;
        this.designation = com.designation;
        this.address = com.address;
        this.mobile = com.mobile;
        this.telephone = com.telephone;
        this.fax = com.fax;
        this.status = com.status;
        this.id = com.id;
    }

    public Company() {
    }
}
